<%--
  Created by IntelliJ IDEA.
  User: 吴博武
  Date: 2016/7/27
  Time: 15:39
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<c:set var="path" value="${pageContext.request.contextPath}"/>
<html>
<title>项目管理</title>
<body>
<p>

<div class="row">
	<form id="projectSearchForm">
		<div class="research_content_col col-xs-12">
			<div class="form-group col-xs-12 col-sm-3 researchInput">
				<label class="col-xs-3 col-sm-4 col-lg-3 control-label">项目名称</label>
				<div class="col-xs-9 col-sm-8 col-lg-9 control-input">
					<input class="form-control" placeholder="请输入项目名称..."
						   type="text" name="Q_p.name_like">
				</div>
			</div>
			<div class="form-group col-xs-12 col-sm-3 researchInput">
				<label class="col-xs-3 col-sm-4 col-lg-3 control-label">创建人</label>
				<div class="col-xs-9 col-sm-8 col-lg-9 control-input">
					<input class="form-control" placeholder="请输入创建人..."
						   type="text" name="Q_a.nameCn_like">
				</div>
			</div>
			<div class="form-group col-xs-12 col-sm-3 researchInput">
				<label class="col-xs-3 col-sm-4 col-lg-3 control-label">负责人</label>
				<div class="col-xs-9 col-sm-8 col-lg-9 control-input">
					<input class="form-control" placeholder="请输入负责人..."
						   type="text" name="Q_c.nameCn_like">
				</div>
			</div>
		</div>
	</form>
</div>
<div class="row">
	<div class="col-xs-12">
		<p>
		<div class="row">
			<div class="col-xs-12 col-sm-12">

				<button class="btn btn-success btn-sm" type="button" onclick="project.searchProjectInfo(false)">
					<span class="glyphicon glyphicon-search"></span>
					搜索
				</button>
				<button class="btn btn-primary btn-sm" onclick="project.openWinAddOrEdit(true)" type="button">
					<span class="glyphicon glyphicon-plus"></span>
					新增
				</button>
				<button class="btn btn-warning btn-sm" onclick="project.openWinAddOrEdit(false);" type="button">
					<span class="glyphicon glyphicon-pencil"></span>
					修改
				</button>
				<button class="btn btn-danger btn-sm" onclick="project.delProject();" type="button">
					<span class="glyphicon glyphicon-trash"></span>
					删除
				</button>
				<button type="button" class="btn btn-info btn-sm" onclick="project.clearProjForm();">
					<span class="glyphicon glyphicon-remove"></span>
					清空查询
				</button>
			</div>
		</div>
		<%--按钮部分结束--%>
		<p>
		<div class="row">
			<div class="col-xs-12 col-sm-12" style="overflow: hidden;">
				<table id="projectGridTable"></table>
				<div id="projectGridPager"></div>
			</div>
		</div>

		<div class="row">
			<div class="col-xs-12">
				<!-- PAGE CONTENT BEGINS -->
				<div class="row">
					<div class="col-xs-12 col-sm-12">
						<!-- #section:elements.tab -->
						<div class="tabbable">
							<p>
							<ul class="nav nav-tabs" id="myTab">
								<li class="active">
									<a data-toggle="tab" href="#home">
										<i class="green ace-icon fa fa-home bigger-120"></i>
										用户
									</a>
								</li>
							</ul>
							</p>
							<div class="row">
								<div class="col-xs-12 col-sm-12">
									<button class="btn btn-primary btn-sm" type="button"
											onclick="project.openWinAddProjRelAcc()">
										<span class="glyphicon glyphicon-plus"></span>
										新增
									</button>
									<button class="btn btn-danger btn-sm" type="button" onclick="project.delProjectRelAccount()">
										<span class="glyphicon glyphicon-trash"></span>
										删除
									</button>
								</div>
							</div>
							<p>
							<div class="row">
								<div   class="col-xs-12 col-sm-12"  style="overflow: hidden;">
									<table id="accountGridTable"></table>
									<div id="accountGridPager"></div>
								</div>
							</div>
						</div><!-- /.col -->
					</div><!-- /.row -->
				</div>
			</div><!-- /.col -->
		</div><!-- /.row -->
	</div>


</div>

<!-- 项目管理-新增弹窗begin -->
<div class="modal-content" id="projectAddOrEditModal" style="display: none; padding: 10px;">
	<form id="projectAddOrEditModalForm" action="">
		<table class="sun-form-table">
			<tr>
				<td><input type="text" name="id" id="id" class="sun-form-input form-control hide"/></td>
				<td><input type="text" name="accountId" id="accountId" class="sun-form-input form-control hide"/></td>
				<td><input type="text" name="accountName" id="accountName" class="sun-form-input form-control hide"/>
				</td>
				<td><input type="text" name="createAccountId" id="createAccountId"
						   class="sun-form-input form-control hide"/></td>
				<td><input type="text" name="modifyAccountId" id="modifyAccountId"
						   class="sun-form-input form-control hide"/></td>
				<td><input type="text" name="projectAccountId" id="projectAccountId"
						   class="sun-form-input form-control hide"/></td>
			</tr>
			<tr>
				<th>项目名称</th>
				<td><input type="text" name="name" class="sun-form-input form-control" id="name" required="required"/></td>
				<th>项目负责人</th>
				<td><input type="text" name="projectAccount" class="sun-form-input form-control" id="projectAccount"
						   required="required"
						   placeholder="双击出现选择弹窗" readonly="true"
						   ondblclick="project.openWinSelectProjectAccount()"/></td>
			</tr>
			<tr>
				<th>项目描述</th>
				<td colspan="4"><textarea rows="4" cols="1" name="remark" class="sun-form-input form-control" id="remark"></textarea></td>

			</tr>

		</table>
	</form>
</div>
<!-- 项目管理-新增弹窗end -->


<!-- 用户管理-新增删除弹窗begin -->
<div class="modal-content" id="accountAddOrDelModal" style="display: none;overflow-x: hidden">
	<div class="container" style="margin-top: 10px">
		<div class="row">
			<div class="col-sm-3 col-md-3" >
				<p><strong>选中用户</strong></p>
				<div style="margin-top: 10px;">

					<button id="saveRelAccBtn" type="button" class="btn btn-info btn-sm" onclick="">
						<span class="glyphicon glyphicon-ok"></span>&nbsp;&nbsp;保存
					</button>
					<button type="button" class="btn btn-danger btn-sm" onclick="project.removeAddedAccount()">
						<span class="glyphicon glyphicon-trash"></span>&nbsp;&nbsp;移除
					</button>
					<button id="closeOpenWinBtn" type="button" class="btn btn-warning btn-sm" onclick="">
						<span class="glyphicon glyphicon-remove"></span>&nbsp;&nbsp;取消
					</button>
				</div>
				<div class="col-sm-12" style="margin-top:10px; margin-bottom:10px;width: 270px;padding-left: 0px;">
					<select class="form-control" id="addProjectRelAccountTable" name="accAddedJqgridTable"
							multiple="multiple"
							style="height:330px">
					</select>
				</div>
			</div>
			<div class="col-sm-9 col-md-9" style="border-left:1px solid #f0f6e4;">
				<form class="form-horizontal" id="searchAccountForm" role="form">

					<div class="form-group col-xs-6 col-sm-3 col-md-3">
						<label class="col-sm-4 col-md-4  control-label " for="accNameCn"
							   style="font-size:12px;text-align: center;padding: 0;padding-right: 5px;overflow: hidden">中文名
						</label>

						<div class="col-sm-8 col-md-8 " style="padding: 0px">
							<input name="Q_nameCn_like" id="accNameCn" type="text" style="width: 100%;">
						</div>
					</div>
					<div class="form-group col-xs-6 col-sm-3 col-md-3">
						<label class="col-sm-4 col-md-4  control-label " for="accountCellPhone"
							   style="font-size:12px;text-align: center;padding: 0;padding-right: 5px;overflow: hidden">手机
						</label>

						<div class="col-sm-8 col-md-8 " style="padding: 0px">
							<input name="Q_cellPhone_rightLike" id="accountCellPhone" type="text" style="width: 100%;">
						</div>
					</div>
					<div class="col-xs-6 col-sm-3 hide">
						<input id="userDelStatus" value="0" type="text" name="Q_delStatus_=_Short">
					</div>
				</form>
				<div class="col-sm-12" style="margin-top: 10px">

					<button type="button" class="btn btn-success btn-sm"
							onclick="project.searchAccountInfo('#searchAccountForm','#addProjRelAccJqgridTable');">
						<span class="glyphicon glyphicon-search"></span>&nbsp;&nbsp;查询
					</button>
					<button type="button" class="btn btn-primary btn-sm" onclick="project.addAccount();">
						<span class="glyphicon glyphicon-plus"></span>&nbsp;&nbsp;添加
					</button>
					<button type="button" class="btn btn-info btn-sm" onclick="project.clearAccForm();">
						<span class="glyphicon glyphicon-remove"></span>&nbsp;&nbsp;清空查询
					</button>
					用户权限：
					<select id="projectRight">
					</select>

				</div>

				<div class="col-sm-12" style="margin-top:10px; margin-bottom:10px; width: 700px;">
					<table id="addProjRelAccJqgridTable"></table>
					<div id="addProjRelAccJqPagerTable" style="height:45px;"></div>
				</div>
			</div>
		</div>
	</div>
</div>
<!-- 用户管理-新增删除弹窗end -->

<%--双击项目负责人弹窗部分start--%>
<div class="modal-content" id="projectAccountModal" style="display: none;overflow-x: hidden">
	<div class="row">
		<div class="col-xs-12">
			<form action="" id="projectAccountForm">
				<div class="col-xs-12 sun-research-content">
					<!-- 文本形式的查询条件 -->
					<div class="form-group col-xs-6 col-sm-3 col-md-3">
						<label class="col-sm-4 col-md-4  control-label " for="relAccountNameCn"
							   style="font-size:12px;text-align: center;padding: 0;padding-right: 5px;overflow: hidden">中文名
						</label>

						<div class="col-sm-8 col-md-8 " style="padding: 0px">
							<input name="Q_nameCn_like" id="relAccountNameCn" type="text" style="width: 100%;">
						</div>
					</div>
					<div class="form-group col-xs-6 col-sm-3 col-md-3">
						<label class="col-sm-4 col-md-4  control-label " for="relAccountCellPhone"
							   style="font-size:12px;text-align: center;padding: 0;padding-right: 5px;overflow: hidden">手机
						</label>

						<div class="col-sm-8 col-md-8 " style="padding: 0px">
							<input name="Q_cellPhone_rightLike" id="relAccountCellPhone" type="text"
								   style="width: 100%;">
						</div>
					</div>
					<div class="col-xs-6 col-sm-3 hide">
						<input id="accountDelStatus" value="0" type="text" name="Q_delStatus_=_Short">
					</div>
				</div>
			</form>
			<div class="col-sm-12">
				<button type="button" class="btn btn-success btn-sm"
						onclick="project.searchAccountInfo('#projectAccountForm', '#projectAccountTable');">
					<span class="glyphicon glyphicon-search"></span>&nbsp;&nbsp;查询
				</button>
				<button type="button" class="btn btn-info btn-sm" onclick="project.clearProjAccForm();">
					<span class="glyphicon glyphicon-remove"></span>&nbsp;&nbsp;清空查询
				</button>
			</div>
			<div class="col-sm-12" style="margin-top:10px; margin-bottom:10px; width: 880px;">
				<table id="projectAccountTable"></table>
				<div id="projectAccountPager" style="height:45px;"></div>
			</div>
		</div>
	</div>
</div>
<%--双击项目负责人弹窗部分end--%>


<script type="text/javascript">
	var scripts = [null,
		path + '/admin/powerdb/designer/project/js/index.js',
		null];
	$('.page-content-area').ace_ajax('loadScripts', scripts, function () {
		$(document).ready(function () {
			project.init();
		})

	});
</script>
</body>
</html>
